﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using AGDN;
using System;


namespace Sudum
{
    class Enemy
    {
        Vector3 position;
        Vector3 direction;
        float speed = 0.05f;

        public Enemy()
        {

            //calculate the direction and set the position
         

            Random random = new Random();
            Vector3 normal = new Vector3();
            float randomValue = random.Next(0, 11)/10.0f;
            GameLevel.Current().GetPositionFromPolyline(randomValue, ref normal);
            normal.Normalize();
            direction = normal;
            position = GameLevel.Current().GetTubePosition() + (direction * 3);
        }
        public void Update()
        {
            position += direction * speed;
        }
        public Vector3 GetPos()
        {
            return position;
        }

    }
}
